<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft HTML Help Workshop 4.1">
<title>To assign a window type to a topic when linking</title>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
<script language="JavaScript" src="master.js"></script>
</head>

<body>

<h1>To assign a window type to a topic when linking
</h1>

	<ol>
	<li>Define the appropriate <a href="winsec2.htm">secondary window</a> type in the project file.
	<li>Open the HTML file you are linking from and click <a onclick="doSection(wiz)" class=sidebar href="#nowhere"><b>HTML Help ActiveX Control</b></a>.

	<DIV CLASS="sidebartext" ID="wiz" STYLE="display: none; height: 72px; width: 300px"
	onclick="noSection(wiz)">
<img src="sb_wiz.gif" width=64 height=64 border=0 alt="">
	<P class=margin>			
	<b>HTML Help ActiveX Control</b>
	</P>
	<P class=margin2>			
	Opens the HTML Help ActiveX Control Wizard, which enables you to insert or edit the control in an HTML file. 
	</P>
	</DIV>

	<li>In the <b>Specify the command</b> box, click <b>Related Topics</b>, and then, if you have already used the HTML Help ActiveX control in this file, enter an ID name for this instance of the control.
	<li>Click <b>Next</b>, and then, because you most likely do not want a button associated with the link text, click  <b>Hidden</b> to specify that you will be scripting this use of the HTML Help ActiveX control.
	<li>Click <b>Next</b>, click <b>Add</b>, and then enter the <b>Title</b> and <b>File/URL</b> information for the topic you are linking to.
	<li>In the <b>Window</b> box, specify the name of the secondary window you want the topic to appear in. This name must match the name you gave the secondary window in the project file.
	<li>Click <b>Next</b>, and then click <b>Finish</b>.
	<li>Add the following JavaScript syntax to the file to create the text link:<BR><BR>
<code>&lt;A HREF=JavaScript:hhctrl.Click()&gt;link&lt;/a&gt</code> <BR><BR>
where <code>hhctrl</code> is the ID for the instance of the control and <code>link</code> is the link text. 
	</li>
	</ol>

<h3>Notes</h3>

	<ul>
	<li>For example, you could link to the file Apple.htm with the title "How to eat an apple" and have the topic appear in a wide window.
	<li>The link will not work until the file is compiled.
	<li>For more information about the control, see the <a href="ms-its:hhaxref.chm::/ocx_intro.htm">HTML Help ActiveX control reference</a>.
	</li>
	</ul>
<table border="0" cellpadding="0" cellspacing="0">

<tr> <td valign="top"><a href="win.htm"><img src="home.gif" alt="Home page link" border="0"></a>
</td><td><a href="win.htm">About creating help windows</a>
</td></tr>
<tr><td>&nbsp;</td></tr>
</table>

</body>
</html>
